00001
00010 #ifndef AF_ZDO_H
00011 #define AF_ZDO_H
00012
00013 #include "application_configuration.h"
00014
00015 void afRegisterApplication(struct applicationConfiguration ac);
00016 void afRegisterGenericApplication();
00017 void zdoStartApplication();
00018
00019 void afSendData(unsigned char destinationEndpoint, unsigned char sourceEndpoint,
00020 unsigned int destinationShortAddress, unsigned int clusterId,
00021 unsigned char* data, unsigned char dataLength);
00022 void zdoRequestIeeeAddress(unsigned int shortAddress, unsigned char requestType, unsigned char startIndex);
00023 unsigned char* zdoNetworkAddressRequest(unsigned char* ieeeAddress, unsigned char requestType, unsigned char startIndex);
00024 void printZdoNetworkAddressResponse(unsigned char* rsp);
00025
00026 #define SINGLE_DEVICE_RESPONSE 0
00027 #define INCLUDE_ASSOCIATED_DEVICES 1
00028
00029 #define AF_DATA_REQUEST_HEADER_SIZE 10
00030
00031 #define AF_DATA_CONFIRM_TIMEOUT_MS 2000 //timeout to wait for AF_DATA_CONFIRM. Adjust for network size.
00032 #define AF_DATA_CONFIRM_INTERVAL_MS 2 //how often to poll for AF_DATA_CONFIRM. Must be less than AF_DATA_CONFIRM_TIMEOUT_MS. Minimum is ~2mSec.
00033
00034 #define ZDO_IEEE_ADDR_RSP_TIMEOUT_MS 2000 //timeout to wait for ZDO_IEEE_ADDR_RSP. Adjust for network size.
00035 #define ZDO_IEEE_ADDR_RSP_INTERVAL_MS 20 //how often to poll for ZDO_IEEE_ADDR_RSP. Must be less than ZDO_IEEE_ADDR_RSP_MS. Typ is ~20mSec.
00036
00037 #define ZDO_NWK_ADDR_RSP_TIMEOUT_MS 2000 //timeout to wait for ZDO_NWK_ADDR_RSP. Adjust for network size.
00038 #define ZDO_NWK_ADDR_RSP_INTERVAL_MS 50 //how often to poll for ZDO_NWK_ADDR_RSP. Must be less than ZDO_NWK_ADDR_RSP_TIMEOUT_MS. Minimum is ~2mSec.
00039
00040
00041
00042
00043 #endif